//
//  WSSureOrderControllerHelper.h
//  FD
//
//  Created by xiaofang wang on 2018/11/22.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//  请求数据
// "确认订单" 不需要传shopid
// "再来一单" 需要传递shouid

#import <Foundation/Foundation.h>
@class WSSureOrderModel; //

NS_ASSUME_NONNULL_BEGIN

@protocol WSSureOrderControllerHelperDelegate <NSObject>
/**2019-1-3开始请求数据*/
- (void)beginRequestData;

/**
 请求到数据

 @param arr arr description
 @param soModel soModel description
 @param userCouponList 优惠券列表数据，传到可用优惠券列表界面。
 */
- (void)didRequestDataWithArr:(NSArray *)arr wsSureOrderModel:(WSSureOrderModel *)soModel userCouponList:(NSArray *)userCouponList;

/**网络请求失败 1-3*/
- (void)didFailedRequestDataWithErrorMessage:(NSString *)errorMessage;

//!!!!:2019-2-18 再来一单预览请求接口为:"order/preview/again"  确认订单预览请求接口为:/user/order/preview
- (void)didRequestOrderPreviewAgainDataWithArr:(NSArray *)array wsSureOrderModel:(WSSureOrderModel *)soModel userCouponList:(NSArray *)userCouponList;
/**再来一单预览网络请求失败*/
- (void)didFailedRequestOrderPreviewAgainDataWithErrorMessage:(NSString *)errorMessage;


/**
 计算现价总价和原价总价

 @param currentSumPrice 现价总价
 @param originsumPrice 原价总价
 */
- (void)didCountingCurrentSumPrice:(CGFloat)currentSumPrice originSumPrice:(CGFloat)originsumPrice;

@end







@interface WSSureOrderControllerHelper : NSObject
/**代理方法*/
@property (nonatomic, weak) id<WSSureOrderControllerHelperDelegate> delegate;

/**1.请求订单信息数据*/
- (void)loadSureOrderData;

/**2.调结算接口*/
//- (void)helperRequestJieSuanWithParDic:(NSDictionary *)dic;


/**3.再来一单页面*/
- (void)loadZaiLaiYiDanDataWithOrderId:(NSString *)orderId;

@end

NS_ASSUME_NONNULL_END


//参考数据格式
/**
 {"event":"SUCCESS","data":{"userCartList":[{"quantity":1,"goods":{"originalPrice":22.00,"ingredientClassify":[{"name":"测试分类1","ingredientList":[{"originalPrice":4.00,"name":"测试配料3","currentPrice":4.00,"id":970}],"id":15,"free":0}],"currentPrice":33.00,"id":198,"title":"李兵专用"},"remark":"","id":624},{"quantity":1,"goods":{"originalPrice":22.00,"ingredientClassify":[{"name":"测试分类1","ingredientList":[{"originalPrice":4.00,"name":"测试配料3","currentPrice":4.00,"id":970}],"id":15,"free":0}],"currentPrice":33.00,"id":198,"title":"李兵专用"},"remark":"","id":623}],"userCouponList":[]},"describe":""}
 */
